package org.piggy.core.reponse;

import io.netty.handler.codec.http.DefaultHttpHeaders;
import io.netty.handler.codec.http.HttpHeaders;
import io.netty.handler.codec.http.HttpResponseStatus;
import org.asynchttpclient.Response;

public class GatewayResponse {
    private final HttpHeaders responseHeaders = new DefaultHttpHeaders();
    private final HttpHeaders extraResponseHeaders = new DefaultHttpHeaders();
    private String content;
    private Response response;
    private HttpResponseStatus httpResponseStatus;

    public void setContent(String content) {
        this.content = content;
    }

    public void setResponse(Response response) {
        this.response = response;
    }

    public void setHttpResponseStatus(HttpResponseStatus httpResponseStatus) {
        this.httpResponseStatus = httpResponseStatus;
    }

    public void putHeader(CharSequence key, String val){
        responseHeaders.add(key,val);
    }

    public void putExtraHeader(CharSequence key, String val){
        extraResponseHeaders.add(key,val);
    }

    public String getContent() {
        return content;
    }

    public HttpHeaders getResponseHeaders() {
        return responseHeaders;
    }

    public HttpHeaders getExtraResponseHeaders() {
        return extraResponseHeaders;
    }

    public Response getResponse() {
        return response;
    }

    public HttpResponseStatus getHttpResponseStatus() {
        return httpResponseStatus;
    }

}
